package com.biostime.terminal.util;

import org.jdom.Element;

public class Head extends BaseElement {
	/**
	 * 
	 */
	private static final long serialVersionUID = -3508933994041587388L;
	private String seqNo = "";
	private String version = "";
	private String className = "";
	
	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getSeqNo() {
		return seqNo;
	}

	public void setSeqNo(String seqNo) {
		this.seqNo = seqNo;
	}

	public Element toElement() {
		Element head = new Element("head");
		if ((seqNo != null) && (!seqNo.trim().equals(""))) {
			head.addContent(new Element("seqNo").setText(getSeqNo()));
		}
		if ((className != null) && (!className.trim().equals(""))) {
			head.addContent(new Element("className").setText(getClassName()));
		}		
		if ((version != null) && (!version.trim().equals(""))) {
			head.addContent(new Element("version").setText(getVersion()));
		}
		return head;
	}
}